﻿using System;
using System.ComponentModel;
using System.Configuration;
using System.IO;
using System.Windows;

namespace Oxage.Common
{
	public class Settings
	{
		/// <summary>
		/// Gets the current working directory.
		/// </summary>
		public static string WorkingDirectory
		{
			get
			{
				string directory = ConfigurationManager.AppSettings["WorkingDirectory"];
				if (string.IsNullOrEmpty(directory))
				{
					directory = Path.Combine(Environment.CurrentDirectory, "Output");
				}
				return directory;
			}
		}

		/// <summary>
		/// Gets a value indicating whether the application is running inside the Expression Blend.
		/// This flag is useful when you need to display dummy data while designing user interface.
		/// </summary>
		public static bool IsDesignMode
		{
			get
			{
				return Application.Current.MainWindow != null ? DesignerProperties.GetIsInDesignMode(Application.Current.MainWindow) : false;
			}
		}
	}
}
